﻿using DAL.Permission.Store;
using Model.Permission;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BLL.Permission.Store
{
    public class ExtendedPermissionBLL
    {
        ExtendedPermissionDAL dal = new ExtendedPermissionDAL();

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int ID, string Comment)
        {
            return dal.Exists(ID, Comment);
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string Comment)
        {
            return dal.Exists(Comment);
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool ExistsByType(int typeId)
        {
            return dal.ExistsByType(typeId);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(ExtendedPermissionEntity model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(ExtendedPermissionEntity model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int ExtendedPermissionID)
        {

            return dal.Delete(ExtendedPermissionID);
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool DeleteList(string ExtendedPermissionIDlist)
        {
            return dal.DeleteList(ExtendedPermissionIDlist);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ExtendedPermissionEntity GetModel(int ExtendedPermissionID)
        {

            return dal.GetModel(ExtendedPermissionID);
        }

    }
}
